package demo;

public class Work01 {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 2; i < 101; i+=2) {
                    System.out.println(Thread.currentThread().getName()+"--->"+i);

                }
            }
        }, "子线程").start();

        for (int i = 1; i < 101; i+=2) {
            System.out.println(Thread.currentThread().getName()+"主线程->"+i);

        }
    }
}
